﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ContractorReport.aspx.cs" Inherits="Catering.yl.ContractorReport" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../../../Style/center.css" />   
    <style type="text/css">
        #tb1 tr{
            font-size:small;
            height:30px;
        }
        .auto-style1 {
            width: 127px;
        }
        #tb1 {
            width: 370px;
        }
        .auto-style3 {
            width: 704px;
        }
        .auto-style4 {
            width: 126px;
        }
    </style> 
    <script src="../../../Scripts/jquery-1.4.1.js" type="text/javascript"></script> 
    <link href="../../../Style/ZHJG/zhezhao.css" rel="stylesheet" type="text/css" />
    <script src="../../../Scripts/zhezhao.js" type="text/javascript"></script>  
    <script type="text/javascript">  
        function Add()
        {
            window.open('DynamicPM.aspx', 'newwindow', 'top='+(screen.height-350)/2+ ',left='+(screen.width-310)/2+ ',toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no,height=317,width=305');
        }
        //保存日报信息
        function Save() {
            <%  string Mtce_ConID_val = "";
                if (ddl_Mtc.Items.Count != 0)
                    Mtce_ConID_val = ddl_Mtc.SelectedValue;               
            %>
            var Mtce_ConID = '<%=Mtce_ConID_val%>';
            <%  string Process_ConID_val = "";
                if (ddl_Process.Items.Count != 0)
                    Process_ConID_val = ddl_Mtc.SelectedValue;               
            %>
            var Process_ConID = '<%=Process_ConID_val%>';
             <%  string Toutsource_ConID_val = "";
                if (ddl_Toutsource.Items.Count != 0)
                    Toutsource_ConID_val = ddl_Mtc.SelectedValue;               
            %>
            var Toutsource_ConID = '<%=Toutsource_ConID_val%>';
            var hdn_useDate = $("#hdn_useDate").val();
            var hdn_currentClassID = $("#hdn_currentClassID").val();
            var hdn_currentGroupID = $("#hdn_currentGroupID").val();
            $.ajax({
                type: "Post",
                url: "ContractorReport.aspx/IsExists",
                data: "{'Mtce_ConID':'" + Mtce_ConID + "','Process_ConID':'" + Process_ConID + "','Toutsource_ConID':'" + Toutsource_ConID + "','hdn_useDate':'" + hdn_useDate + "','hdn_currentClassID':'" + hdn_currentClassID + "','hdn_currentGroupID':'" + hdn_currentGroupID + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                async: false,
                success: function (data) {
                    if (data.d == "OK") {//存在
                        if (!confirm("存在该日日报，是否覆盖？")) {
                            return;
                        }
                        else {
                            Save_ConReport();
                        }
                    }
                    else {
                        Save_ConReport();
                    }
                }
            });
        }
        function Save_ConReport() {
            var Mtce_Content = $("#Mtce_Content").val();            
            var Mtce_RIfication = $("#Mtce_RIfication").val();            
            var Mtce_CMeasures = $("#Mtce_CMeasures").val();
            var Process_Content = $("#Process_Content").val();            
            var Process_RIfication = $("#Process_RIfication").val();            
            var Process_CMeasures = $("#Process_CMeasures").val();            
            var Toutsource_Content = $("#Toutsource_Content").val();            
            var Toutsource_RIfication = $("#Toutsource_RIfication").val();            
            var Toutsource_CMeasures = $("#Toutsource_CMeasures").val();            
            var Toutsource_Pnums = $("#Toutsource_Pnums").val();            
            //var sel = document.getElementById("ddl_Mtc");
            //var Mtce_ConID = sel.options[sel.selectedIndex].value;
            <%  string Mtce_ConID_val1 = "";
                if (ddl_Mtc.Items.Count != 0)
                    Mtce_ConID_val1 = ddl_Mtc.SelectedValue;               
            %>
            var Mtce_ConID = '<%=Mtce_ConID_val1%>';
            //var sel1 = document.getElementById("ddl_Process");
            //var Process_ConID = sel1.options[sel1.selectedIndex].value;
            <%  string Process_ConID_val1 = "";
                if (ddl_Process.Items.Count != 0)
                    Process_ConID_val1 = ddl_Process.SelectedValue;               
            %>
            var Process_ConID = '<%=Process_ConID_val1%>';
            //var sel2 = document.getElementById("ddl_Toutsource");
            //var Toutsource_ConID = sel2.options[sel2.selectedIndex].value;
            <%  string Toutsource_ConID_val1 = "";
                if (ddl_Toutsource.Items.Count != 0)
                    Toutsource_ConID_val1 = ddl_Toutsource.SelectedValue;               
            %>
            var Toutsource_ConID = '<%=Toutsource_ConID_val1%>';
            var hdn_useDate = $("#hdn_useDate").val();
            var hdn_currentClassID = $("#hdn_currentClassID").val();
            var hdn_currentGroupID = $("#hdn_currentGroupID").val();
            $.ajax({
                type: "Post",
                url: "ContractorReport.aspx/Save_ConReport",
                data: "{'Mtce_Content':'" + Mtce_Content + "','Mtce_RIfication':'" + Mtce_RIfication + "','Mtce_CMeasures':'" + Mtce_CMeasures + "','Mtce_ConID':'" + Mtce_ConID + "','Process_Content':'" + Process_Content + "','Process_RIfication':'" + Process_RIfication + "','Process_CMeasures':'" + Process_CMeasures + "','Process_ConID':'" + Process_ConID + "','Toutsource_Content':'" + Toutsource_Content + "','Toutsource_RIfication':'" + Toutsource_RIfication + "','Toutsource_CMeasures':'" + Toutsource_CMeasures + "','Toutsource_Pnums':'" + Toutsource_Pnums + "','Toutsource_ConID':'" + Toutsource_ConID + "','hdn_useDate':'" + hdn_useDate + "','hdn_currentClassID':'" + hdn_currentClassID + "','hdn_currentGroupID':'" + hdn_currentGroupID + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    if (data.d == "OK") {
                        alert("保存成功！");
                        window.location.href = window.location.href;
                    }
                }
            });
        }
    </script>         
</head>
<body style="background-color:#E5F1FD">
    <form id="form1" runat="server" >
        <input type="hidden" id="hdn_useDate" value='<%=Session["useDate"]%>' />
        <input type="hidden" id="hdn_currentClassID" value='<%=Session["ClassID"]%>' />
        <input type="hidden" id="hdn_currentGroupID" value='<%=Session["GroupID"]%>' />
    <div style="margin:auto; width:370px; height:480px">
        <table style="width:370px; margin-right: 0px; font-size:12px" cellpadding="0" cellspacing="0" border="0" align="center"> 
            <tr>
                <td style="width:100px"></td>
                <td style="width:100px">
                </td>
                <td style="width:50px;"><asp:Button ID="Del" runat="server" Text="删除" OnClick="Del_Click" CssClass="input_btn_a" /></td>
                <td style="width:70px">
                    <input id="Button1" class="input_btn_a" type="button" value="保存" onclick="Save()" /></td>
            </tr> 
        </table>
        <table id="tb1">
            <tr style="height:20px">
                <td class="auto-style4"><asp:Label Width="84px" ID="Label2" runat="server" Text="承包商汇报：" Height="16px"></asp:Label></td>
                <td class="auto-style3"><asp:RadioButton ID="ReportYes" runat="server" Text="是" GroupName="CtorReport" AutoPostBack="True" Checked="True" OnCheckedChanged="ReportYes_CheckedChanged" /></td>
                <td class="auto-style1"><asp:RadioButton ID="ReportNo" runat="server" Text="否" GroupName="CtorReport" OnCheckedChanged="ReportNo_CheckedChanged" AutoPostBack="True" /></td>
            </tr> 
            <tr>
                <td class="auto-style4"><span style="color:blue">1.日常维护保养</span></td>
                <td class="auto-style3">
                    <asp:DropDownList ID="ddl_Mtc" runat="server" Width="100%" AutoPostBack="True" OnSelectedIndexChanged="ddl_Mtc_SelectedIndexChanged" CssClass="select_input_bg"></asp:DropDownList>
                </td>
                <td>
                    <input runat="server" id="Bon1" type="button" value="人员动态" class="input_btn_a" onclick="Add()" style="height:27px;width:83px;float:right"/>
                </td>
            </tr>               
            <tr>
                <td class="auto-style4" style="text-align:right"><span style="color:red;font-weight:bold">(*)</span>作业内容:</td>
                <td colspan="2"><asp:TextBox Width="96%" ID="Mtce_Content" runat="server"></asp:TextBox></td>
            </tr>  
            <tr>
                <td class="auto-style4" style="text-align:right"><span style="color:red;font-weight:bold">(*)</span>风险识别:</td>
                <td colspan="2"><asp:TextBox Width="96%" ID="Mtce_RIfication" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td class="auto-style4" style="text-align:right"><span style="color:red;font-weight:bold;">(*)</span>控制措施:</td>
                <td colspan="2"><asp:TextBox Width="96%" ID="Mtce_CMeasures" runat="server"></asp:TextBox></td>
            </tr> 
            <tr>
                <td class="auto-style4"><span style="color:blue">2.项目施工监管</span></td>
                <td class="auto-style3">
                    <asp:DropDownList ID="ddl_Process" runat="server" Width="100%" AutoPostBack="True" OnSelectedIndexChanged="ddl_Process_SelectedIndexChanged" CssClass="select_input_bg"></asp:DropDownList>
                </td>
                <td><asp:Button ID="ROCProject" style="float:right;width:83px;height:27px;"  runat="server" Text="施工方案审核" OnClick="ROCProject_Click" CssClass="input_btn_a" /></td>
            </tr>              
            <tr>
                <td class="auto-style4" style="text-align:right"><span style="color:red;font-weight:bold">(*)</span>作业内容:</td>
                <td colspan="2"><asp:TextBox Width="96%" ID="Process_Content" runat="server"></asp:TextBox></td>
            </tr>  
            <tr>
                <td class="auto-style4" style="text-align:right"><span style="color:red;font-weight:bold">(*)</span>风险识别:</td>
                <td colspan="2"><asp:TextBox Width="96%" ID="Process_RIfication" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td class="auto-style4" style="text-align:right"><span style="color:red;font-weight:bold">(*)</span>控制措施:</td>
                <td colspan="2"><asp:TextBox Width="96%" ID="Process_CMeasures" runat="server"></asp:TextBox></td>
            </tr>   
             <tr runat="server" id="tr1">
                <td colspan="1" class="auto-style4">3<span style="color:blue">.终端外包业务</span></td>
                <td class="auto-style3">
                    <asp:DropDownList ID="ddl_Toutsource" runat="server" Width="100%" AutoPostBack="True" OnSelectedIndexChanged="ddl_Toutsource_SelectedIndexChanged" CssClass="select_input_bg"></asp:DropDownList>
                 </td>
                <td></td>
            </tr>              
            <tr runat="server" id="tr2">
                <td class="auto-style4" style="text-align:right"><span style="color:red;font-weight:bold">(*)</span>作业内容:</td>
                <td colspan="2"><asp:TextBox Width="96%" ID="Toutsource_Content" runat="server"></asp:TextBox></td>
            </tr>  
            <tr runat="server" id="tr3">
                <td class="auto-style4" style="text-align:right"><span style="color:red;font-weight:bold">(*)</span>风险识别:</td>
                <td colspan="2"><asp:TextBox Width="96%" ID="Toutsource_RIfication" runat="server"></asp:TextBox></td>
            </tr>
            <tr runat="server" id="tr4">
                <td class="auto-style4" style="text-align:right"><span style="color:red;font-weight:bold">(*)</span>控制措施:</td>
                <td colspan="2"><asp:TextBox Width="96%" ID="Toutsource_CMeasures" runat="server"></asp:TextBox></td>
            </tr> 
            <tr runat="server" id="tr5">
                <td class="auto-style4" style="text-align:right"><span style="color:red;font-weight:bold">(*)</span>作业人数:</td>
                <td colspan="2"><asp:TextBox Width="96%" ID="Toutsource_Pnums" runat="server"></asp:TextBox></td>
            </tr>            
        </table>
     </div>        
    </form>
</body>
</html>
